const CONFIG = require('../../config.js');

Page({
	data: {
		navBgColor: '-webkit-gradient(linear, 0% 0%, 0% 100%,from(#1b64e5), to(#488dea))',
		loginInfo: null,
		planList: [],
		workList: [ {name: '工薪族', id: '1'}, {name: '企业主', id: '2'}, {name: '自由职业', id: '3'}],
		D010List:[
			{ name: '住宅', id: '0'},
			{ name: '商铺', id: '1'},
			{ name: '70年产权公寓', id: '2'},
			{ name: '非70年产权公寓', id: '3'},
			{ name: '写字楼', id: '4'},
			{ name: '厂房', id: '5'},
			{ name: '其他', id: '6'},
		],
		isList: [ {name: '是', id: '1'}, {name: '否', id: '0'} ],
		
		J002List: [ {name: '非运营', id: '1'}, {name: '运营', id: '0'} ],
		J009List: [ {name: '已解押', id: '1'}, {name: '未解押', id: '0'} ],
		J003List: [
			{ name: '轿车', id: '0' },
			{ name: '运输车', id: '1'},
			{ name: '工程车', id: '2'},
		],

		formData:{
			E001: ''
		},
		textList: {
			zhudai: ''
		},
		proId: 1
	},
	
  	// 单选
	  radioChange: function (e) {
		const {field} = e.currentTarget.dataset;
		this.setData({
			[`formData.${field}`]: e.currentTarget.dataset.value
		})
	},
	
	// 方案管理信息列表
	submitFn(){
		wx.navigateBack({
			delta:1
		})
	},
	

	onLoad: function (options) {
		let loginInfo = wx.getStorageSync('loginInfo') || '';
		if(loginInfo){
			this.setData({
				loginInfo : JSON.parse(loginInfo),
				isTrueData: wx.getStorageSync('showUser'),
			})
			
			if(this.data.isTrueData === '0'){
				this.setData({
					[`textList.zhudai`]: '\u52a9\u8d37',
				})
			}
		}
		this.setData({
			proId : options.proId
		})
	},
})
